home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / reuse.lha / reuse / c / Errors.h < prev    next >
C/C++ Source or Header  |  1992-08-18  |  3KB  |  87 lines

  1. # ifndef yyErrors
  2. # define yyErrors
  3.  
  4. /* $Id: Errors.h,v 1.1 1992/08/13 12:14:11 grosch rel $ */
  5.  
  6. /* $Log: Errors.h,v $
  7.  * Revision 1.1  1992/08/13  12:14:11  grosch
  8.  * deleted redefinition of bool
  9.  *
  10.  * Revision 1.0  1992/08/07  14:31:41  grosch
  11.  * Initial revision
  12.  *
  13.  */
  14.  
  15. /* Ich, Doktor Josef Grosch, Informatiker, Juli 1992 */
  16.  
  17. # include <stdio.h>
  18. # include "ratc.h"
  19. # include "Positions.h"
  20.  
  21. # define xxNoText        0
  22. # define xxSyntaxError        1    /* error codes        */
  23. # define xxExpectedTokens    2
  24. # define xxRestartPoint        3
  25. # define xxTokenInserted    4
  26. # define xxTooManyErrors    5
  27.  
  28. # define xxFatal        1    /* error classes    */
  29. # define xxRestriction        2
  30. # define xxError        3
  31. # define xxWarning        4
  32. # define xxRepair        5
  33. # define xxNote            6
  34. # define xxInformation        7
  35.  
  36. # define xxNone            0
  37. # define xxInteger        1    /* info classes        */
  38. # define xxShort        2
  39. # define xxLong            3
  40. # define xxReal            4
  41. # define xxBoolean        5
  42. # define xxCharacter        6
  43. # define xxString        7
  44. # define xxSet            8
  45. # define xxIdent        9
  46.  
  47. # if defined __STDC__ | defined __cplusplus
  48. # define ARGS(parameters)    parameters
  49. # else
  50. # define ARGS(parameters)    ()
  51. # endif
  52.  
  53. extern void (* Errors_Exit) ();
  54.             /* Refers to a procedure that specifies        */
  55.             /* what to do if 'ErrorClass' = Fatal.        */
  56.             /* Default: terminate program execution.    */
  57.  
  58. extern void StoreMessages ARGS((bool Store));
  59.             /* Messages are stored if 'Store' = TRUE    */
  60.             /* for printing with the routine 'WriteMessages'*/
  61.             /* otherwise they are printed immediately.    */
  62.             /* If 'Store'=TRUE the message store is cleared.*/
  63.  
  64. extern void ErrorMessage  ARGS((int ErrorCode, int ErrorClass, tPosition Position));
  65.             /* Report a message represented by an integer    */
  66.             /* 'ErrorCode' and classified by 'ErrorClass'.    */
  67.  
  68. extern void ErrorMessageI ARGS((int ErrorCode, int ErrorClass, tPosition Position, int InfoClass, char * Info));
  69.             /* Like the previous routine with additional    */
  70.             /* information of type 'InfoClass' at the    */
  71.             /* address 'Info'.                */
  72.  
  73. extern void Message      ARGS((char * ErrorText, int ErrorClass, tPosition Position));
  74.             /* Report a message represented by a string    */
  75.             /* 'ErrorText' and classified by 'ErrorClass'.    */
  76.  
  77. extern void MessageI      ARGS((char * ErrorText, int ErrorClass, tPosition Position, int InfoClass, char * Info));
  78.             /* Like the previous routine with additional    */
  79.             /* information of type 'InfoClass' at the    */
  80.             /* address 'Info'.                */
  81.  
  82. extern void WriteMessages ARGS((FILE * File));
  83.             /* The stored messages are sorted by their    */
  84.             /* source position and printed on 'File'.    */
  85.  
  86. # endif
  87.